from rest_framework import serializers
from . import models

class DepartmentSerializer(serializers.ModelSerializer):
    class Meta:
        model=models.Department
        fields="__all__"


class UserSerializer(serializers.ModelSerializer):
    dept= serializers.CharField(source='dept.name')
    class Meta:
        model=models.User
        fields="__all__"